package com.TeacherInfoServer.common.service;

import com.TeacherInfoServer.pojo.DTO.LearningExperienceDTO;
import com.TeacherInfoServer.pojo.DTO.SearchDTO.LearningExperienceSearchDTO;
import com.TeacherInfoServer.pojo.DTO.UpdateLearningExperienceDTO;
import com.TeacherInfoServer.pojo.entity.LearningExperience;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpServletResponse;
import lombok.SneakyThrows;
import org.springframework.transaction.annotation.Transactional;

import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface LearningExperienceService extends IService<LearningExperience> {
    Map<String, Object> getList(Integer pages, Integer size);

    Map<String,Object> searchLearningExperienceList(LearningExperienceSearchDTO learningExperienceSearchDTO);

    @Transactional
    void addLearningExperience(LearningExperienceDTO learningExperienceDTO);

    //@Transactional
    //void updateLearningExperience(LearningExperience learningExperience);

    @Transactional
    void updateLearningExperience(UpdateLearningExperienceDTO learningExperience);

    @Transactional
    boolean deleteLearningExperience(List<Long> ids);

    @SneakyThrows(IOException.class)
    void exportInfo(HttpServletResponse response);
}
